<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    li{
      height: 50px;
      background-color: rgb(128, 99, 99);
      margin-top:10px;
      width: 500px;
    }
  </style>
</head>
<body>
  <div id="app">
    <ul>
      <li @click="change(index)" v-for="(item,index) in arr" :key="index">
        {{ item }}
      </li>
    </ul>
  </div>
  <script src="./vue.js"></script>
  <script>
    const vm = new Vue({
      el: '#app',
      data:{
        arr: [1,2,3,4]
      },
      methods:{
        change(index){
          /* this.arr[index] = 1000;
          console.log(this.arr); */
          this.$set(this.arr,index,1000)
        }
      }
    })
  </script>
</body>
</html>